#include "adddeviceitem.h"

AddDeviceItem::AddDeviceItem(QPushButton *parent) : QPushButton(parent)
{
    initUI();
}

AddDeviceItem::~AddDeviceItem() {}

void AddDeviceItem::initUI()
{
    QHBoxLayout *mainHLayout = new QHBoxLayout();

    //项按钮
    m_itemIconLabel = new QLabel(this);
    m_itemIconLabel->setFixedSize(20, 20);
    m_itemIconLabel->setPixmap(QIcon(":/icon/add.png").pixmap(20, 20));
    //继续搜索
    m_continueSearchLabel = new QLabel(this);
    m_continueSearchLabel->setText(tr("continue search")); // Continue search


    mainHLayout->addSpacing(14);
    mainHLayout->addWidget(m_itemIconLabel);
    mainHLayout->addSpacing(14);
    mainHLayout->addWidget(m_continueSearchLabel);
    mainHLayout->addStretch();
    mainHLayout->setSpacing(0);
    mainHLayout->setContentsMargins(0, 0, 0, 0);
    this->setLayout(mainHLayout);
}
